import { baseUrl, doRequestPost, doRequestDel, doRequestPut, doRequestGet } from '@/utils/request'

export function plateListTree(query) {
    return doRequestPost(baseUrl + 'cms/plateinfo/listTree' + '?time=' + (+new Date()), query)
}

export function plateStock(query) {
    return doRequestPost(baseUrl + 'cms/stock/plate' + '?time=' + (+new Date()), query)
}

export function plateList(query) {
    return doRequestPost(baseUrl + 'cms/plateinfo/list' + '?time=' + (+new Date()), query)
}

export function plateAdd(query) {
    return doRequestPost(baseUrl + 'cms/plateinfo/add' + '?time=' + (+new Date()), query)
}

export function plateUpdate(query) {
    return doRequestPost(baseUrl + 'cms/plateinfo/update' + '?time=' + (+new Date()), query)
}

export function plateDelete(query) {
    return doRequestPost(baseUrl + 'cms/plateinfo/delete/' + query.id + '?time=' + (+new Date()), {})
}

export function stockList(query) {
    return doRequestPost(baseUrl + 'cms/stock/plate' + '?time=' + (+new Date()), query)
}

export function stockListUpdate(query) {
    return doRequestPost(baseUrl + 'cms/relation/update' + '?time=' + (+new Date()), query)
}

export function searchPlateList(query) {
    return doRequestPost(baseUrl + 'cms/plateinfo/listByStock' + '?time=' + (+new Date()), query)
}

export function plateLisArea(query) {
    return doRequestGet(baseUrl + 'plate/area/listArea' + '?time=' + (+new Date()), query)
}

export function plateLisAreaStock(query) {
	return doRequestGet(baseUrl + 'plate/area/listStockByArea?dtCode=' + query.code, query)
}

export function listStockByAreaSc(query) {
    return doRequestPost(baseUrl + 'plate/area/listStockByAreaSc' + '?time=' + (+new Date()), query)
}